import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 结算查询list
export const queryBalanceOem = params => axios.get(`${SERVER.DMSCLOUD_FINANCE}/basedata/settlement/queryBalanceOem`, { params });
// 结算详情
export const searchRepairOrderDetailOem = params => axios.get(`${SERVER.DMSCLOUD_FINANCE}/basedata/settlement/searchRepairOrderDetailOem`, { params });

// 维修项目查询
export const getAllRepairLabour = params => axios.get(`${SERVER.DMSCLOUD_FINANCE}/basedata/repairHistory/getAllRepairLabour`, { params });

// 维修材料查询
export const getAllRepairPart = params => axios.get(`${SERVER.DMSCLOUD_FINANCE}/basedata/repairHistory/getAllRepairPart`, { params });
// 附加项目查询
export const getAllRepairAddItem = params => axios.get(`${SERVER.DMSCLOUD_FINANCE}/basedata/repairHistory/getAllRepairAddItem`, { params });
// 派工情况查询
export const getAllRepairAssign = params => axios.get(`${SERVER.DMSCLOUD_FINANCE}/basedata/repairHistory/getAllRepairAssign`, { params });

// 维修类型下拉框
export const getRepairTypes = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedataRepairtypes/findAllRepairType`, { params });

// 查询所有人
export const getAllUser = params => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/basedata/users/getDealerUser`);

//获取所有经销商
export const getAllDealer = params => axios.get(`${SERVER.CMSCLOUD_CHANNEL}/message/dealerAttach/dealerInfo/byAllTranslate`, { params });

// 导出
export const factoryExportsSettlement = params => axios.get(`${SERVER.DMSCLOUD_FINANCE}/basedata/settlement/exportExcel`, { params, responseType: 'arraybuffer' });
